package com.beta.util;

import java.nio.ByteBuffer;

public class Request
{
  private byte[] requestBytes;

  public Request(int paramInt1, int paramInt2, int paramInt3, int paramInt4, int paramInt5)
  {
    ByteBuffer localByteBuffer = ByteBuffer.allocate(5);
    localByteBuffer.put((byte)paramInt1);
    localByteBuffer.put((byte)paramInt2);
    localByteBuffer.put((byte)paramInt3);
    localByteBuffer.put((byte)paramInt4);
    localByteBuffer.put((byte)paramInt5);
    this.requestBytes = localByteBuffer.array();
  }

  public Request(int paramInt1, int paramInt2, int paramInt3, int paramInt4,
		  byte[] paramArrayOfByte)
  {
    ByteBuffer localByteBuffer = ByteBuffer.allocate(5 + paramArrayOfByte.length);
    localByteBuffer.put((byte)paramInt1);
    localByteBuffer.put((byte)paramInt2);
    localByteBuffer.put((byte)paramInt3);
    localByteBuffer.put((byte)paramInt4);
    localByteBuffer.put((byte)paramArrayOfByte.length);
    localByteBuffer.put(paramArrayOfByte);
    this.requestBytes = localByteBuffer.array();
  }

  public Request( byte[] paramArrayOfByte){
	  ByteBuffer localByteBuffer = ByteBuffer.allocate( paramArrayOfByte.length);
	  localByteBuffer.put(paramArrayOfByte);
	  this.requestBytes = localByteBuffer.array();
  }
  
  public Request(int paramInt1, int paramInt2, int paramInt3, int paramInt4, 
		  byte[] paramArrayOfByte, int paramInt5)
  {
    ByteBuffer localByteBuffer = ByteBuffer.allocate(6 + paramArrayOfByte.length);
    localByteBuffer.put((byte)paramInt1);
    localByteBuffer.put((byte)paramInt2);
    localByteBuffer.put((byte)paramInt3);
    localByteBuffer.put((byte)paramInt4);
    localByteBuffer.put((byte)paramArrayOfByte.length);
    localByteBuffer.put(paramArrayOfByte);
    localByteBuffer.put((byte)paramInt5);
    this.requestBytes = localByteBuffer.array();
  }

  public byte[] getRequestBytes()
  {
    return this.requestBytes;
  }

  public String toString()
  {
    return HexUtil.encode(this.requestBytes);
  }
}
